package org.perche.chat.server;

import org.perche.chat.thrift.services.GreetingService;

import com.google.inject.Inject;

/**
 * Anna Service factory
 *
 */
public class ServiceFactory {
	private static ServiceFactory singleton = null;
	private GreetingService.Iface greetingService = null;
	
	

  /**
   * @param greetingService annotationService to set
   */
  @Inject
  public void setGreetingService(GreetingService.Iface greetingService) { this.greetingService = greetingService; }
  
  /**
   * @return the greeting service
   */
  public GreetingService.Iface getGreetingService() { return this.greetingService; }

	/**
	 * @return the instance of servicefactory
	 */
	public static ServiceFactory getInstance() {
	  if (null == singleton) {
	    singleton = new ServiceFactory();
	  }
	  return singleton;
	}
}
